package com.fss.article1.service.impl;

import java.util.List;
import com.fss.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fss.article1.mapper.Article1Mapper;
import com.fss.article1.domain.Article1;
import com.fss.article1.service.IArticle1Service;

/**
 * article1Service业务层处理
 * 
 * @author llf
 * @date 2024-12-02
 */
@Service
public class Article1ServiceImpl implements IArticle1Service 
{
    @Autowired
    private Article1Mapper article1Mapper;

    /**
     * 查询article1
     * 
     * @param id article1主键
     * @return article1
     */
    @Override
    public Article1 selectArticle1ById(Long id)
    {
        return article1Mapper.selectArticle1ById(id);
    }

    /**
     * 查询article1列表
     * 
     * @param article1 article1
     * @return article1
     */
    @Override
    public List<Article1> selectArticle1List(Article1 article1)
    {
        return article1Mapper.selectArticle1List(article1);
    }

    /**
     * 新增article1
     * 
     * @param article1 article1
     * @return 结果
     */
    @Override
    public int insertArticle1(Article1 article1)
    {
        article1.setCreateTime(DateUtils.getNowDate());
        return article1Mapper.insertArticle1(article1);
    }

    /**
     * 修改article1
     * 
     * @param article1 article1
     * @return 结果
     */
    @Override
    public int updateArticle1(Article1 article1)
    {
        return article1Mapper.updateArticle1(article1);
    }

    /**
     * 批量删除article1
     * 
     * @param ids 需要删除的article1主键
     * @return 结果
     */
    @Override
    public int deleteArticle1ByIds(Long[] ids)
    {
        return article1Mapper.deleteArticle1ByIds(ids);
    }

    /**
     * 删除article1信息
     * 
     * @param id article1主键
     * @return 结果
     */
    @Override
    public int deleteArticle1ById(Long id)
    {
        return article1Mapper.deleteArticle1ById(id);
    }
}
